<?php 
$_SESSION['upanh'] = $this->session->userdata('upanh');

$_SESSION['url'] = '/upload/';

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>

	<title></title>	

    <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />

	<!--CSS-->

	<link rel="stylesheet" type="text/css" href="<?php echo base_url();?>temp/admin/css/style.css" />

    <script type="text/javascript" src="<?php echo base_url();?>temp/admin/js/jquery1.8.3.min.js"></script>   

    <!-- dat truoc vai gia tri ban dau-->    

    <script>

    var base_url = "<?php echo base_url();?>";

    var order = new Array(); 

    <?php $order = $this->session->userdata('order');?>

    order['0'] ="<?php echo @$order['0'];?>";

    order['1'] ="<?php echo @$order['1'];?>";

    </script>

     <!-- thay vao truong id-->   

</head>



<body>

	<!--Main Container - Centers Everything-->

	<div id="container">		

	   <div id="sidebar" class="left">

            <ul>    

                <li><a href="<?php echo base_url();?>admin">Home</a></li>

                <li><a href="<?php echo base_url();?>admin/route/slideshow/list">Slideshow</a></li>

                <li><a href="<?php echo base_url();?>admin/route/categories/list">Category</a></li>

                <li><a href="<?php echo base_url();?>admin/route/content/list">Article</a></li>

                <li><a href="<?php echo base_url();?>admin/route/network/list">Network</a></li>

                <li><a href="<?php echo base_url();?>admin/route/offer/list">Offer</a></li>
                
                <li><a href="<?php echo base_url();?>admin/route/country/list">Country</a></li>

                <li><a href="<?php echo base_url();?>admin/route/users/list">Users</a></li> 
                              
                <li><a href="<?php echo base_url();?>admin/usergroup">Group</a></li>

                <li><a class="setupnet" href="<?php echo base_url();?>admin/setupnet">Auto addnet</a></li>

            </ul>

            

       </div>

       <div class="manincontent clearfix">

            <div class="cheader">

                <div class="link">

                    <span class="user">Welcome admin:</span>

                    <span class="email"><a href="#">5 messages</a></span>

                    <span class="viewsite"><a href="<?php echo base_url();?>" target="_blank">View site</a></span>

                    <span class="logout"><a href="<?php echo base_url();?>admin/logout">Logout</a></span>

                </div>                

            </div> 

                       

            <div class="content">

            <!-- warning-->

            <?php include('messenger.php');?><!-- end warning-->   

            <!-- box-->

                <div class="box"> 

                    <?php if($this->uri->segment(2)=='route'){//check de hien hetader box?>                

                    <div class="box_header clearfix">

                        <?php if($this->uri->segment(4)=='list'||$this->uri->segment(4,0)=='0'){?>

                        <h3 class="left">List</h3>

                        <a href="<?php echo base_url().'admin/route/'.$this->uri->segment(3).'/add/';?>" class="right">add</a>

                        <?php }elseif(($this->uri->segment(4)=='edit')||($this->uri->segment(4)=='add')){?>

                        <h3 class="left">Add/Edit</h3>

                        <a href="<?php $limit=$this->session->userdata('limit'); echo base_url().'admin/route/'.$this->uri->segment(3).'/list/'.$limit['1'];?>" class="right cancel">cancel</a>

                        <?php }//end check headerbox?>

                    </div>

                    <?php }?>

                    <div class="box_content clearfix">

                        <?php if(!empty($content)){ echo $content;}?>                        

                    </div> 

                        <!-------------bo loc ----------------------->

                         <?php  if((!$this->uri->segment(4)||$this->uri->segment(4)=='list'||$this->uri->segment(2)=='usergroup')&&$this->uri->segment(2)!='setupnet' )include('filter.php');?>

                        <!------------end bo loc--------------------->

                </div><!--end box-->

            </div><!--end .content-->

            

       </div> 

	</div>

   <?php

   if($this->uri->segment(4)=='edit' || $this->uri->segment(4)=='add'){

    echo '

     <!--ckeditor-->

    <script type="text/javascript" src="'.base_url().'ckeditor/ckeditor.js"></script>

    <script type="text/javascript" src="'.base_url().'ckeditor/ckfinder/ckfinder.js"></script>

    <script type="text/javascript" src="'.base_url().'temp/admin/js/ck_type.js"></script>

    ';

   }   

   ?>

   <script type="text/javascript" src="<?php echo base_url();?>temp/admin/js/cus.js"></script>   	

</body>

</html>





